package LclJunitTest04;

/**
* @author  Lcl
* @date    2022/4/10
*/

public class PriceCalculate {
    //根据通话时长计算话费
    private double cost;

    public double calculate(long holdingtime){
        if(holdingtime<=20)
            cost=0.05*holdingtime;
        else
            cost=1+(holdingtime-20)*0.1;
        return cost;
    }

}
